package com.weiyuwqj.utils.converter;

import org.springframework.core.convert.converter.Converter;

public class IntegerConverter implements Converter<String,Integer> {

    @Override
    public Integer convert(String text) {
        if (text==null||text.isEmpty())return 0;
        try {
            return Integer.parseInt(text);
        } catch (Exception e) {
        }
        return 0;
    }

}
